﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace VSTranslator.Adornment
{
	/// <summary>
	/// Interaction logic for TranslationItemControl.xaml
	/// </summary>
	public partial class TranslationItemControl : UserControl
	{
		public string Text 
		{
			get { return txtText.Text; }
			set { txtText.Text = value; }
		}

		

		// Declare an event 
		public event EventHandler<PasteEventArgs> Paste;

		protected virtual void OnPaste(PasteEventArgs e)
		{
			if (Paste != null)
				Paste(this, e);
		}   

		public TranslationItemControl()
		{
			InitializeComponent();
		}

		private void Paste_Click(object sender, MouseButtonEventArgs e)
		{
			OnPaste(new PasteEventArgs(Text));
		}
	}
}
